package t

import (
	"sort"
)

func updeate(v int, best int) int {

	return 0
}

func ThreeSumClosest(nums []int, target int) int {
	sort.Ints(nums)
	l := len(nums)
	best := 0 // 最接近的值
	for i:=0; i<l; i++ {
		j := i+1
		k := l -1
		if (i == 0 || nums[i] != nums[i-1] ) {
			sum := nums[i] + nums[j] + nums[k]
			if sum == target {
				return target
			}
			best = updeate(sum, best)
			if sum > target {

			}

			if sum < target {

			}
		}
	}

	return best
}
